/*
 * @Descripttion:
 * @version:
 * @Author: congsir
 * @Date: 2024-01-16 22:51:20
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2024-01-17 23:42:09
 */
const KoaRouter = require("@koa/router");
const userController = require("../controller/user.controller");
const { verifyUser, handlePassword } = require("../middleware/user-middleware");
//1.创建路由对象
const useRouter = new KoaRouter({ prefix: "/users" });
//2. 定义路由中的映射
useRouter.post("/", verifyUser, handlePassword, userController.create);
// 3.导出路由
module.exports = useRouter;
